package com.museum.controller.impl.admin;

import com.alibaba.fastjson.JSONObject;
import com.museum.base.BaseResponse;


import com.museum.controller.api.admin.AdminAreaAPI;
import com.museum.entity.DO.Area;
import com.museum.entity.DTO.area.addArea;
import com.museum.service.impl.admin.AdminAreaServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @ClassName museum
 * @Author: 王瑞文
 * @Date: 2020/12/28 19:32
 */
@RestController
@RequestMapping("super/area")
public class AdminAreaController implements AdminAreaAPI {

    @Autowired
    private AdminAreaServiceImpl adminAreaService;


    @Override
    public BaseResponse<JSONObject> addArea(addArea areaDTO) {
        return adminAreaService.addArea(areaDTO);
    }

    @Override
    public BaseResponse<JSONObject> deleteArea(Integer areaNumber) {
        return adminAreaService.deleteArea(areaNumber);
    }


    @Override
    public BaseResponse<JSONObject> getAllArea() {
        return adminAreaService.getAllArea();
    }

    @Override
    public BaseResponse<JSONObject> updateArea(Area areaUpdate) {
        return adminAreaService.updateArea(areaUpdate);
    }

}
